﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 观察者模式
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Boss huhansan = new Boss();

            StrockObserver tongshi1 = new StrockObserver("同事1", huhansan);

            huhansan.Attach(tongshi1);

            huhansan.SubjectState = "我胡汉三回来了";
            huhansan.Notify();

            Console.ReadLine();
        }
    }
}
